var path = require('path'),
    contextPath = path.join(__dirname, '../'),
    srcPath = path.resolve(contextPath,'src'),
    distPath = path .resolve(contextPath,'dist'),
    webpack = require('webpack'),
    HtmlWebpackPlugin = require('html-webpack-plugin');

    const vendors = [
        "Vue",
        "vue-lazyload",
        "vue-router",
        "whatwg-fetch",
        "vuex"
    ]

module.exports = {
 entry: {
  vendors: vendors
 },
 output: {
    path: path.resolve(contextPath,'dist'),
    filename: '[name].[chunkhash:4].js',
    library: '[name]_[chunkhash]',
 },

 plugins: [
  new webpack.DllPlugin({
   path:'manifest.json',
   // This must match the output.library option above
   name: '[name]_[chunkhash]',
   context:contextPath
  }),
 ],
}